﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;

namespace DAO
{
    public class LoaiNhanVienDAO:DataProvider
    {
        public string GetTenLoaiNV(int maloai)
        {
            connect();
            string tenloai = null;
            string sql = "select ten_loai_nv from LoaiNhanVIen where ma_loai_nv=" + maloai;
            SqlCommand cmd = new SqlCommand(sql, connection);
            SqlDataReader reader = cmd.ExecuteReader();
            while (reader.Read())
            {
                tenloai = reader.GetString(0);
            }
            disconnect();
            return tenloai;
        }
    }
}
